<template>
  <div class="iframe-container" v-loading="loading">
    <iframe :src="src" ref="iframe" id="BI-iframe" @load="loaded" frameborder="0" width="100%" height="100%"></iframe>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loading: false,
      src: '',
      iframeWin: {}
    }
  },
  methods: {
    loaded() {
      // console.log('iframe loaded!!!')
      this.loading = false
    }
  },
  created() {
    this.loading = true
    this.src = window.g.BIURL
  },
  mounted() {
    this.iframeWin = this.$refs.iframe.contentWindow
    console.log(this.iframeWin)
  }
}
</script>

<style lang="scss" scoped>
.iframe-container{
  height: calc(100vh - 50px);
}
</style>
